package com.hz.email.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hz.email.dao.ResultDao;
import com.hz.email.entity.TResult;
import com.hz.email.service.ResultService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ResultServiceImpl implements ResultService {
    @Resource
    private ResultDao resultDao;

    @Override
    public PageInfo<TResult> findAll(TResult tResult) {
        PageHelper.startPage(tResult.getPageIndex(), tResult.getPageSize());
        List<TResult> list = resultDao.findAll(tResult);
        PageInfo<TResult> pageInfo = new PageInfo<TResult>(list);
        return pageInfo;
    }

    @Override
    public List<TResult> findIn(TResult tResult) {
        return resultDao.findIn(tResult);
    }
}
